#include <iostream>
#include <cmath>
#include <algorithm>
//#include <bits/stdc++.h>

using namespace std;
int bin_search(int arr[],int start,int end,int key)
{
	int mid;
	int t_start = start;
	int t_end = end;
	while(t_start <= t_end)
	{
		mid = t_start + ( t_end - t_start)/2;
		if (arr[mid]>key)
		{
			t_end = mid - 1;
		}
		else if (arr[mid]<key)
		{
			t_start = mid + 1;
		}
		else 
			return mid;		
	}
	return -1;
}

int main()
{
	int a[10];
	int k = 0;
	cin >> k ;
	for (int i = 0;i <  10;i++)
	{
	    cin >> a[i];
	}
	cout << k << " " << a << endl;
	
	int x = bin_search(a,5,9,k);
	printf("x = %d\n",x);

	return 0; 
} 
